﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.WebApi
{
    public static class DefaultValue
    {
        /// <summary>
        /// 如果value为null，则返回defaultvalue
        /// </summary>
        /// <param name="value"></param>
        /// <param name="defaultValue"></param>
        /// <returns></returns>
        public static string GetValue(string value, string defaultValue)
        {
            if(string.IsNullOrEmpty(value))
            {
                return defaultValue;
            }
            return value;
        }
    }
}
